package com.naiterui.ehp.bp.domain;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * @author gaoliangliang
 * @d 1.0
 */
@Data
@Entity
@Table(name = "dr_video_group_consult")
public class DrVideoGroupConsult implements Serializable {

    public static int GROUP_CONSULT_STATUS_EMPTY = 0;
    public static int GROUP_CONSULT_STATUS_WAITING = 1;
    public static int GROUP_CONSULT_STATUS_TARGET_OPINION = 2;
    public static int GROUP_CONSULT_STATUS_SOURCE_OPINION = 3;
    public static int GROUP_CONSULT_STATUS_COMPLETE = 4;


    // 主键
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 患者id
     */
    @Column(name = "patient_id")
    private Long patientId;

    /**
     * 就诊人id
     */
    @Column(name = "inquirer_id")
    private Long inquirerId;

    /**
     * 医生id
     */
    @Column(name = "doctor_id")
    private Long doctorId;

    /**
     * 医生名称
     */
    @Column(name = "doctor_name")
    private String doctorName;

    /**
     * 视频问诊ID
     */
    @Column(name = "video_consult_id")
    private Long videoConsultId;

    /**
     * 房间号
     */
    @Column(name = "room_id")
    private Integer roomId;

    /**
     * 会诊状态 会诊状态，1：会诊待开始(可修改会诊时间)，2：受邀方总结，3：发起方总结
     */
    @Column(name = "group_consult_status")
    private Integer groupConsultStatus;

    /**
     * 会诊原由
     */
    @Column(name = "group_consult_reason")
    private String groupConsultReason;

    /**
     * 会诊申请日期时间：2022-07-05
     */
    @Column(name = "group_consult_date")
    private String groupConsultDate;

    /**
     * 会诊申请开始时间：11:00
     */
    @Column(name = "group_consult_time_start")
    private String groupConsultTimeStart;

    /**
     * 会诊申请结束时间：13:00
     */
    @Column(name = "group_consult_time_end")
    private String groupConsultTimeEnd;

    /**
     * 受邀方 会诊意见
     */
    @Column(name = "target_opinion")
    private String targetOpinion;

    /**
     * 受邀方 会诊意见填写时间
     */
    @Column(name = "target_opinion_at")
    private Date targetOpinionAt;

    /**
     * 发起方 会诊意见
     */
    @Column(name = "source_opinion")
    private String sourceOpinion;

    /**
     * 发起方 会诊意见填写时间
     */
    @Column(name = "source_opinion_at")
    private Date sourceOpinionAt;

    /**
     * 受邀方医院名称
     */
    @Column(name = "target_hospital_name")
    private String targetHospitalName;

    /**
     * 受邀方医院ID
     */
    @Column(name = "target_hospital_id")
    private Integer targetHospitalId;

    /**
     * 受邀方医生名称
     */
    @Column(name = "target_doctor_name")
    private String targetDoctorName;

    @Column(name = "target_doctor_phone")
    private String targetDoctorPhone;

    /**
     * 受邀方医生ID
     */
    @Column(name = "target_doctor_Id")
    private Long targetDoctorId;

    /**
     * 科室名称
     */
    @Column(name = "department_name")
    private String departmentName;

    /**
     * PDF
     */
    @Column(name = "pdf_path")
    private String pdfPath;

    /**
     * 专家意见PDF
     */
    @Column(name = "target_pdf")
    private String targetPdf;

    /**
     * 发起医师PDF
     */
    @Column(name = "source_pdf")
    private String sourcePdf;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 更新时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 更新人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 版本号
     */
    @Version
    @Column(name = "version")
    private Integer version;
}
